﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Shsc.Net.Common.Dto;
using Shsc.Net.Common.Service;

namespace Shsc.Net.Web.Extension
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class PagingBaseController : BaseController
    {
        /// <summary>
        /// 
        /// </summary>
        public abstract PagingBaseCondDto condDto { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="baseDto"></param>
        /// <returns></returns>
        public ActionResult Search(PagingBaseDto baseDto)
        {
            BasePagingService pagingService = (BasePagingService)service;
            pagingService.Search(baseDto);
            return View(baseDto);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="baseDto"></param>
        /// <returns></returns>
        public ActionResult Paging(PagingBaseDto baseDto)
        {
            BasePagingService pagingService = (BasePagingService)service;
            pagingService.Paging(baseDto);
            return View(baseDto);
        }
    }
}
